home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-04-05 | 6.1 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sun Apr 5 14:41:10 1992, modified Sun Apr 5 14:41:10 1992, creator 'MPS ', type ASCII, 5603 bytes "alloca.c" , at 0x1663 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 61 6c 6c 6f 63 61 | 2e 63 00 00 00 00 00 00 |..alloca|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 15 e3 00 | 00 01 ac a6 04 fa 46 a6 |........|......F.|
|00000060| 04 fa 46 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..F.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f8 a9 00 00 |........|........|
|00000080| 2f 2a 0d 09 61 6c 6c 6f | 63 61 20 2d 2d 20 28 6d |/*..allo|ca -- (m|
|00000090| 6f 73 74 6c 79 29 20 70 | 6f 72 74 61 62 6c 65 20 |ostly) p|ortable |
|000000a0| 70 75 62 6c 69 63 2d 64 | 6f 6d 61 69 6e 20 69 6d |public-d|omain im|
|000000b0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 2d 2d 20 |plementa|tion -- |
|000000c0| 44 20 41 20 47 77 79 6e | 0d 0d 09 6c 61 73 74 20 |D A Gwyn|...last |
|000000d0| 65 64 69 74 3a 09 38 36 | 2f 30 35 2f 33 30 09 72 |edit:.86|/05/30.r|
|000000e0| 6d 73 0d 09 20 20 20 69 | 6e 63 6c 75 64 65 20 63 |ms.. i|nclude c|
|000000f0| 6f 6e 66 69 67 2e 68 2c | 20 73 69 6e 63 65 20 6f |onfig.h,| since o|
|00000100| 6e 20 56 4d 53 20 69 74 | 20 72 65 6e 61 6d 65 73 |n VMS it| renames|
|00000110| 20 73 6f 6d 65 20 73 79 | 6d 62 6f 6c 73 2e 0d 09 | some sy|mbols...|
|00000120| 20 20 20 55 73 65 20 78 | 6d 61 6c 6c 6f 63 20 69 | Use x|malloc i|
|00000130| 6e 73 74 65 61 64 20 6f | 66 20 6d 61 6c 6c 6f 63 |nstead o|f malloc|
|00000140| 2e 0d 0d 09 54 68 69 73 | 20 69 6d 70 6c 65 6d 65 |....This| impleme|
|00000150| 6e 74 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 50 |ntation |of the P|
|00000160| 57 42 20 6c 69 62 72 61 | 72 79 20 61 6c 6c 6f 63 |WB libra|ry alloc|
|00000170| 61 28 29 20 66 75 6e 63 | 74 69 6f 6e 2c 0d 09 77 |a() func|tion,..w|
|00000180| 68 69 63 68 20 69 73 20 | 75 73 65 64 20 74 6f 20 |hich is |used to |
|00000190| 61 6c 6c 6f 63 61 74 65 | 20 73 70 61 63 65 20 6f |allocate| space o|
|000001a0| 66 66 20 74 68 65 20 72 | 75 6e 2d 74 69 6d 65 20 |ff the r|un-time |
|000001b0| 73 74 61 63 6b 20 73 6f | 0d 09 74 68 61 74 20 69 |stack so|..that i|
|000001c0| 74 20 69 73 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |t is aut|omatical|
|000001d0| 6c 79 20 72 65 63 6c 61 | 69 6d 65 64 20 75 70 6f |ly recla|imed upo|
|000001e0| 6e 20 70 72 6f 63 65 64 | 75 72 65 20 65 78 69 74 |n proced|ure exit|
|000001f0| 2c 20 0d 09 77 61 73 20 | 69 6e 73 70 69 72 65 64 |, ..was |inspired|
|00000200| 20 62 79 20 64 69 73 63 | 75 73 73 69 6f 6e 73 20 | by disc|ussions |
|00000210| 77 69 74 68 20 4a 2e 20 | 51 2e 20 4a 6f 68 6e 73 |with J. |Q. Johns|
|00000220| 6f 6e 20 6f 66 20 43 6f | 72 6e 65 6c 6c 2e 0d 0d |on of Co|rnell...|
|00000230| 09 49 74 20 73 68 6f 75 | 6c 64 20 77 6f 72 6b 20 |.It shou|ld work |
|00000240| 75 6e 64 65 72 20 61 6e | 79 20 43 20 69 6d 70 6c |under an|y C impl|
|00000250| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 74 68 61 74 20 |ementati|on that |
|00000260| 75 73 65 73 20 61 6e 0d | 09 61 63 74 75 61 6c 20 |uses an.|.actual |
|00000270| 70 72 6f 63 65 64 75 72 | 65 20 73 74 61 63 6b 20 |procedur|e stack |
|00000280| 28 61 73 20 6f 70 70 6f | 73 65 64 20 74 6f 20 61 |(as oppo|sed to a|
|00000290| 20 6c 69 6e 6b 65 64 20 | 6c 69 73 74 20 6f 66 0d | linked |list of.|
|000002a0| 09 66 72 61 6d 65 73 29 | 2e 20 20 54 68 65 72 65 |.frames)|. There|
|000002b0| 20 61 72 65 20 73 6f 6d | 65 20 70 72 65 70 72 6f | are som|e prepro|
|000002c0| 63 65 73 73 6f 72 20 63 | 6f 6e 73 74 61 6e 74 73 |cessor c|onstants|
|000002d0| 20 74 68 61 74 20 63 61 | 6e 0d 09 62 65 20 64 65 | that ca|n..be de|
|000002e0| 66 69 6e 65 64 20 77 68 | 65 6e 20 63 6f 6d 70 69 |fined wh|en compi|
|000002f0| 6c 69 6e 67 20 66 6f 72 | 20 79 6f 75 72 20 73 70 |ling for| your sp|
|00000300| 65 63 69 66 69 63 20 73 | 79 73 74 65 6d 2c 20 66 |ecific s|ystem, f|
|00000310| 6f 72 0d 09 69 6d 70 72 | 6f 76 65 64 20 65 66 66 |or..impr|oved eff|
|00000320| 69 63 69 65 6e 63 79 3b | 20 68 6f 77 65 76 65 72 |iciency;| however|
|00000330| 2c 20 74 68 65 20 64 65 | 66 61 75 6c 74 73 20 73 |, the de|faults s|
|00000340| 68 6f 75 6c 64 20 62 65 | 20 6f 6b 61 79 2e 0d 0d |hould be| okay...|
|00000350| 09 54 68 65 20 67 65 6e | 65 72 61 6c 20 63 6f 6e |.The gen|eral con|
|00000360| 63 65 70 74 20 6f 66 20 | 74 68 69 73 20 69 6d 70 |cept of |this imp|
|00000370| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 69 73 20 74 |lementat|ion is t|
|00000380| 6f 20 6b 65 65 70 0d 09 | 74 72 61 63 6b 20 6f 66 |o keep..|track of|
|00000390| 20 61 6c 6c 20 61 6c 6c | 6f 63 61 28 29 2d 61 6c | all all|oca()-al|
|000003a0| 6c 6f 63 61 74 65 64 20 | 62 6c 6f 63 6b 73 2c 20 |located |blocks, |
|000003b0| 61 6e 64 20 72 65 63 6c | 61 69 6d 20 61 6e 79 0d |and recl|aim any.|
|000003c0| 09 74 68 61 74 20 61 72 | 65 20 66 6f 75 6e 64 20 |.that ar|e found |
|000003d0| 74 6f 20 62 65 20 64 65 | 65 70 65 72 20 69 6e 20 |to be de|eper in |
|000003e0| 74 68 65 20 73 74 61 63 | 6b 20 74 68 61 6e 20 74 |the stac|k than t|
|000003f0| 68 65 20 63 75 72 72 65 | 6e 74 0d 09 69 6e 76 6f |he curre|nt..invo|
|00000400| 63 61 74 69 6f 6e 2e 20 | 20 54 68 69 73 20 68 65 |cation. | This he|
|00000410| 75 72 69 73 74 69 63 20 | 64 6f 65 73 20 6e 6f 74 |uristic |does not|
|00000420| 20 72 65 63 6c 61 69 6d | 20 73 74 6f 72 61 67 65 | reclaim| storage|
|00000430| 20 61 73 0d 09 73 6f 6f | 6e 20 61 73 20 69 74 20 | as..soo|n as it |
|00000440| 62 65 63 6f 6d 65 73 20 | 69 6e 76 61 6c 69 64 2c |becomes |invalid,|
|00000450| 20 62 75 74 20 69 74 20 | 77 69 6c 6c 20 64 6f 20 | but it |will do |
|00000460| 73 6f 20 65 76 65 6e 74 | 75 61 6c 6c 79 2e 0d 0d |so event|ually...|
|00000470| 09 41 73 20 61 20 73 70 | 65 63 69 61 6c 20 63 61 |.As a sp|ecial ca|
|00000480| 73 65 2c 20 61 6c 6c 6f | 63 61 28 30 29 20 72 65 |se, allo|ca(0) re|
|00000490| 63 6c 61 69 6d 73 20 73 | 74 6f 72 61 67 65 20 77 |claims s|torage w|
|000004a0| 69 74 68 6f 75 74 0d 09 | 61 6c 6c 6f 63 61 74 69 |ithout..|allocati|
|000004b0| 6e 67 20 61 6e 79 2e 20 | 20 49 74 20 69 73 20 61 |ng any. | It is a|
|000004c0| 20 67 6f 6f 64 20 69 64 | 65 61 20 74 6f 20 75 73 | good id|ea to us|
|000004d0| 65 20 61 6c 6c 6f 63 61 | 28 30 29 20 69 6e 0d 09 |e alloca|(0) in..|
|000004e0| 79 6f 75 72 20 6d 61 69 | 6e 20 63 6f 6e 74 72 6f |your mai|n contro|
|000004f0| 6c 20 6c 6f 6f 70 2c 20 | 65 74 63 2e 20 74 6f 20 |l loop, |etc. to |
|00000500| 66 6f 72 63 65 20 67 61 | 72 62 61 67 65 20 63 6f |force ga|rbage co|
|00000510| 6c 6c 65 63 74 69 6f 6e | 2e 0d 2a 2f 0d 0d 2f 2a |llection|..*/../*|
|00000520| 20 44 65 66 69 6e 65 20 | 73 6f 6d 65 20 63 6f 6e | Define |some con|
|00000530| 73 74 61 6e 74 73 20 73 | 6f 20 61 6c 6c 6f 63 61 |stants s|o alloca|
|00000540| 20 64 6f 65 73 6e 27 74 | 20 68 61 76 65 20 74 6f | doesn't| have to|
|00000550| 20 75 73 65 20 74 68 65 | 20 64 65 66 61 75 6c 74 | use the| default|
|00000560| 73 20 2a 2f 0d 0d 23 69 | 66 64 65 66 20 6d 61 63 |s */..#i|fdef mac|
|00000570| 69 6e 74 6f 73 68 0d 23 | 64 65 66 69 6e 65 20 53 |intosh.#|define S|
|00000580| 54 41 43 4b 5f 44 49 52 | 45 43 54 49 4f 4e 09 2d |TACK_DIR|ECTION.-|
|00000590| 31 0d 23 64 65 66 69 6e | 65 20 41 4c 49 47 4e 5f |1.#defin|e ALIGN_|
|000005a0| 53 49 5a 45 09 09 38 0d | 23 65 6e 64 69 66 0d 0d |SIZE..8.|#endif..|
|000005b0| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 73 74 61 |#ifndef |lint.sta|
|000005c0| 74 69 63 20 63 68 61 72 | 09 53 43 43 53 69 64 5b |tic char|.SCCSid[|
|000005d0| 5d 20 3d 20 22 40 28 23 | 29 61 6c 6c 6f 63 61 2e |] = "@(#|)alloca.|
|000005e0| 63 09 31 2e 31 22 3b 09 | 2f 2a 20 66 6f 72 20 74 |c.1.1";.|/* for t|
|000005f0| 68 65 20 22 77 68 61 74 | 22 20 75 74 69 6c 69 74 |he "what|" utilit|
|00000600| 79 20 2a 2f 0d 23 65 6e | 64 69 66 0d 0d 23 69 66 |y */.#en|dif..#if|
|00000610| 64 65 66 20 65 6d 61 63 | 73 0d 23 69 6e 63 6c 75 |def emac|s.#inclu|
|00000620| 64 65 20 22 63 6f 6e 66 | 69 67 2e 68 22 0d 23 69 |de "conf|ig.h".#i|
|00000630| 66 64 65 66 20 73 74 61 | 74 69 63 0d 2f 2a 20 61 |fdef sta|tic./* a|
|00000640| 63 74 75 61 6c 6c 79 2c | 20 6f 6e 6c 79 20 77 61 |ctually,| only wa|
|00000650| 6e 74 20 74 68 69 73 20 | 69 66 20 73 74 61 74 69 |nt this |if stati|
|00000660| 63 20 69 73 20 64 65 66 | 69 6e 65 64 20 61 73 20 |c is def|ined as |
|00000670| 22 22 0d 20 20 20 2d 2d | 20 74 68 69 73 20 69 73 |"". --| this is|
|00000680| 20 66 6f 72 20 75 73 67 | 2c 20 69 6e 20 77 68 69 | for usg|, in whi|
|00000690| 63 68 20 65 6d 61 63 73 | 20 6d 75 73 74 20 75 6e |ch emacs| must un|
|000006a0| 64 65 66 69 6e 65 20 73 | 74 61 74 69 63 0d 20 20 |define s|tatic. |
|000006b0| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 6d 61 6b | in orde|r to mak|
|000006c0| 65 20 75 6e 65 78 65 63 | 20 77 6f 72 6b 61 62 6c |e unexec| workabl|
|000006d0| 65 0d 20 20 20 2a 2f 0d | 23 69 66 6e 64 65 66 20 |e. */.|#ifndef |
|000006e0| 53 54 41 43 4b 5f 44 49 | 52 45 43 54 49 4f 4e 0d |STACK_DI|RECTION.|
|000006f0| 79 6f 75 0d 6c 6f 73 65 | 0d 2d 2d 20 6d 75 73 74 |you.lose|.-- must|
|00000700| 20 6b 6e 6f 77 20 53 54 | 41 43 4b 5f 44 49 52 45 | know ST|ACK_DIRE|
|00000710| 43 54 49 4f 4e 20 61 74 | 20 63 6f 6d 70 69 6c 65 |CTION at| compile|
|00000720| 2d 74 69 6d 65 0d 23 65 | 6e 64 69 66 20 2f 2a 20 |-time.#e|ndif /* |
|00000730| 53 54 41 43 4b 5f 44 49 | 52 45 43 54 49 4f 4e 20 |STACK_DI|RECTION |
|00000740| 75 6e 64 65 66 69 6e 65 | 64 20 2a 2f 0d 23 65 6e |undefine|d */.#en|
|00000750| 64 69 66 20 2f 2a 20 73 | 74 61 74 69 63 20 2a 2f |dif /* s|tatic */|
|00000760| 0d 23 65 6e 64 69 66 20 | 2f 2a 20 65 6d 61 63 73 |.#endif |/* emacs|
|00000770| 20 2a 2f 0d 0d 23 69 66 | 64 65 66 20 58 33 4a 31 | */..#if|def X3J1|
|00000780| 31 0d 74 79 70 65 64 65 | 66 20 76 6f 69 64 09 2a |1.typede|f void.*|
|00000790| 70 6f 69 6e 74 65 72 3b | 09 09 2f 2a 20 67 65 6e |pointer;|../* gen|
|000007a0| 65 72 69 63 20 70 6f 69 | 6e 74 65 72 20 74 79 70 |eric poi|nter typ|
|000007b0| 65 20 2a 2f 0d 23 65 6c | 73 65 0d 74 79 70 65 64 |e */.#el|se.typed|
|000007c0| 65 66 20 63 68 61 72 09 | 2a 70 6f 69 6e 74 65 72 |ef char.|*pointer|
|000007d0| 3b 09 09 2f 2a 20 67 65 | 6e 65 72 69 63 20 70 6f |;../* ge|neric po|
|000007e0| 69 6e 74 65 72 20 74 79 | 70 65 20 2a 2f 0d 23 65 |inter ty|pe */.#e|
|000007f0| 6e 64 69 66 0d 0d 23 64 | 65 66 69 6e 65 09 4e 55 |ndif..#d|efine.NU|
|00000800| 4c 4c 09 30 09 09 09 2f | 2a 20 6e 75 6c 6c 20 70 |LL.0.../|* null p|
|00000810| 6f 69 6e 74 65 72 20 63 | 6f 6e 73 74 61 6e 74 20 |ointer c|onstant |
|00000820| 2a 2f 0d 0d 65 78 74 65 | 72 6e 20 76 6f 69 64 09 |*/..exte|rn void.|
|00000830| 66 72 65 65 28 29 3b 0d | 65 78 74 65 72 6e 20 70 |free();.|extern p|
|00000840| 6f 69 6e 74 65 72 09 78 | 6d 61 6c 6c 6f 63 28 29 |ointer.x|malloc()|
|00000850| 3b 0d 0d 2f 2a 0d 09 44 | 65 66 69 6e 65 20 53 54 |;../*..D|efine ST|
|00000860| 41 43 4b 5f 44 49 52 45 | 43 54 49 4f 4e 20 69 66 |ACK_DIRE|CTION if|
|00000870| 20 79 6f 75 20 6b 6e 6f | 77 20 74 68 65 20 64 69 | you kno|w the di|
|00000880| 72 65 63 74 69 6f 6e 20 | 6f 66 20 73 74 61 63 6b |rection |of stack|
|00000890| 0d 09 67 72 6f 77 74 68 | 20 66 6f 72 20 79 6f 75 |..growth| for you|
|000008a0| 72 20 73 79 73 74 65 6d | 3b 20 6f 74 68 65 72 77 |r system|; otherw|
|000008b0| 69 73 65 20 69 74 20 77 | 69 6c 6c 20 62 65 20 61 |ise it w|ill be a|
|000008c0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 0d 09 64 65 |utomatic|ally..de|
|000008d0| 64 75 63 65 64 20 61 74 | 20 72 75 6e 2d 74 69 6d |duced at| run-tim|
|000008e0| 65 2e 0d 0d 09 53 54 41 | 43 4b 5f 44 49 52 45 43 |e....STA|CK_DIREC|
|000008f0| 54 49 4f 4e 20 3e 20 30 | 20 3d 3e 20 67 72 6f 77 |TION > 0| => grow|
|00000900| 73 20 74 6f 77 61 72 64 | 20 68 69 67 68 65 72 20 |s toward| higher |
|00000910| 61 64 64 72 65 73 73 65 | 73 0d 09 53 54 41 43 4b |addresse|s..STACK|
|00000920| 5f 44 49 52 45 43 54 49 | 4f 4e 20 3c 20 30 20 3d |_DIRECTI|ON < 0 =|
|00000930| 3e 20 67 72 6f 77 73 20 | 74 6f 77 61 72 64 20 6c |> grows |toward l|
|00000940| 6f 77 65 72 20 61 64 64 | 72 65 73 73 65 73 0d 09 |ower add|resses..|
|00000950| 53 54 41 43 4b 5f 44 49 | 52 45 43 54 49 4f 4e 20 |STACK_DI|RECTION |
|00000960| 3d 20 30 20 3d 3e 20 64 | 69 72 65 63 74 69 6f 6e |= 0 => d|irection|
|00000970| 20 6f 66 20 67 72 6f 77 | 74 68 20 75 6e 6b 6e 6f | of grow|th unkno|
|00000980| 77 6e 0d 2a 2f 0d 0d 23 | 69 66 6e 64 65 66 20 53 |wn.*/..#|ifndef S|
|00000990| 54 41 43 4b 5f 44 49 52 | 45 43 54 49 4f 4e 0d 23 |TACK_DIR|ECTION.#|
|000009a0| 64 65 66 69 6e 65 09 53 | 54 41 43 4b 5f 44 49 52 |define.S|TACK_DIR|
|000009b0| 45 43 54 49 4f 4e 09 30 | 09 09 2f 2a 20 64 69 72 |ECTION.0|../* dir|
|000009c0| 65 63 74 69 6f 6e 20 75 | 6e 6b 6e 6f 77 6e 20 2a |ection u|nknown *|
|000009d0| 2f 0d 23 65 6e 64 69 66 | 0d 0d 23 69 66 20 53 54 |/.#endif|..#if ST|
|000009e0| 41 43 4b 5f 44 49 52 45 | 43 54 49 4f 4e 20 21 3d |ACK_DIRE|CTION !=|
|000009f0| 20 30 0d 0d 23 64 65 66 | 69 6e 65 09 53 54 41 43 | 0..#def|ine.STAC|
|00000a00| 4b 5f 44 49 52 09 53 54 | 41 43 4b 5f 44 49 52 45 |K_DIR.ST|ACK_DIRE|
|00000a10| 43 54 49 4f 4e 09 2f 2a | 20 6b 6e 6f 77 6e 20 61 |CTION./*| known a|
|00000a20| 74 20 63 6f 6d 70 69 6c | 65 2d 74 69 6d 65 20 2a |t compil|e-time *|
|00000a30| 2f 0d 0d 23 65 6c 73 65 | 09 2f 2a 20 53 54 41 43 |/..#else|./* STAC|
|00000a40| 4b 5f 44 49 52 45 43 54 | 49 4f 4e 20 3d 3d 20 30 |K_DIRECT|ION == 0|
|00000a50| 3b 20 6e 65 65 64 20 72 | 75 6e 2d 74 69 6d 65 20 |; need r|un-time |
|00000a60| 63 6f 64 65 20 2a 2f 0d | 0d 73 74 61 74 69 63 20 |code */.|.static |
|00000a70| 69 6e 74 09 73 74 61 63 | 6b 5f 64 69 72 3b 09 09 |int.stac|k_dir;..|
|00000a80| 2f 2a 20 31 20 6f 72 20 | 2d 31 20 6f 6e 63 65 20 |/* 1 or |-1 once |
|00000a90| 6b 6e 6f 77 6e 20 2a 2f | 0d 23 64 65 66 69 6e 65 |known */|.#define|
|00000aa0| 09 53 54 41 43 4b 5f 44 | 49 52 09 73 74 61 63 6b |.STACK_D|IR.stack|
|00000ab0| 5f 64 69 72 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |_dir..st|atic voi|
|00000ac0| 64 0d 66 69 6e 64 5f 73 | 74 61 63 6b 5f 64 69 72 |d.find_s|tack_dir|
|00000ad0| 65 63 74 69 6f 6e 20 28 | 2f 2a 20 76 6f 69 64 20 |ection (|/* void |
|00000ae0| 2a 2f 29 0d 7b 0d 20 20 | 73 74 61 74 69 63 20 63 |*/).{. |static c|
|00000af0| 68 61 72 09 2a 61 64 64 | 72 20 3d 20 4e 55 4c 4c |har.*add|r = NULL|
|00000b00| 3b 09 2f 2a 20 61 64 64 | 72 65 73 73 20 6f 66 20 |;./* add|ress of |
|00000b10| 66 69 72 73 74 0d 09 09 | 09 09 20 20 20 60 64 75 |first...|.. `du|
|00000b20| 6d 6d 79 27 2c 20 6f 6e | 63 65 20 6b 6e 6f 77 6e |mmy', on|ce known|
|00000b30| 20 2a 2f 0d 20 20 61 75 | 74 6f 20 63 68 61 72 09 | */. au|to char.|
|00000b40| 64 75 6d 6d 79 3b 09 09 | 2f 2a 20 74 6f 20 67 65 |dummy;..|/* to ge|
|00000b50| 74 20 73 74 61 63 6b 20 | 61 64 64 72 65 73 73 20 |t stack |address |
|00000b60| 2a 2f 0d 0d 20 20 69 66 | 20 28 61 64 64 72 20 3d |*/.. if| (addr =|
|00000b70| 3d 20 4e 55 4c 4c 29 0d | 20 20 20 20 7b 09 09 09 |= NULL).| {...|
|00000b80| 09 2f 2a 20 69 6e 69 74 | 69 61 6c 20 65 6e 74 72 |./* init|ial entr|
|00000b90| 79 20 2a 2f 0d 20 20 20 | 20 20 20 61 64 64 72 20 |y */. | addr |
|00000ba0| 3d 20 26 64 75 6d 6d 79 | 3b 0d 0d 20 20 20 20 20 |= &dummy|;.. |
|00000bb0| 20 66 69 6e 64 5f 73 74 | 61 63 6b 5f 64 69 72 65 | find_st|ack_dire|
|00000bc0| 63 74 69 6f 6e 20 28 29 | 3b 09 2f 2a 20 72 65 63 |ction ()|;./* rec|
|00000bd0| 75 72 73 65 20 6f 6e 63 | 65 20 2a 2f 0d 20 20 20 |urse onc|e */. |
|00000be0| 20 7d 0d 20 20 65 6c 73 | 65 09 09 09 09 2f 2a 20 | }. els|e..../* |
|00000bf0| 73 65 63 6f 6e 64 20 65 | 6e 74 72 79 20 2a 2f 0d |second e|ntry */.|
|00000c00| 20 20 20 20 69 66 20 28 | 26 64 75 6d 6d 79 20 3e | if (|&dummy >|
|00000c10| 20 61 64 64 72 29 0d 20 | 20 20 20 20 20 73 74 61 | addr). | sta|
|00000c20| 63 6b 5f 64 69 72 20 3d | 20 31 3b 09 09 2f 2a 20 |ck_dir =| 1;../* |
|00000c30| 73 74 61 63 6b 20 67 72 | 65 77 20 75 70 77 61 72 |stack gr|ew upwar|
|00000c40| 64 20 2a 2f 0d 20 20 20 | 20 65 6c 73 65 0d 20 20 |d */. | else. |
|00000c50| 20 20 20 20 73 74 61 63 | 6b 5f 64 69 72 20 3d 20 | stac|k_dir = |
|00000c60| 2d 31 3b 09 09 2f 2a 20 | 73 74 61 63 6b 20 67 72 |-1;../* |stack gr|
|00000c70| 65 77 20 64 6f 77 6e 77 | 61 72 64 20 2a 2f 0d 7d |ew downw|ard */.}|
|00000c80| 0d 0d 23 65 6e 64 69 66 | 09 2f 2a 20 53 54 41 43 |..#endif|./* STAC|
|00000c90| 4b 5f 44 49 52 45 43 54 | 49 4f 4e 20 3d 3d 20 30 |K_DIRECT|ION == 0|
|00000ca0| 20 2a 2f 0d 0d 2f 2a 0d | 09 41 6e 20 22 61 6c 6c | */../*.|.An "all|
|00000cb0| 6f 63 61 20 68 65 61 64 | 65 72 22 20 69 73 20 75 |oca head|er" is u|
|00000cc0| 73 65 64 20 74 6f 3a 0d | 09 28 61 29 20 63 68 61 |sed to:.|.(a) cha|
|00000cd0| 69 6e 20 74 6f 67 65 74 | 68 65 72 20 61 6c 6c 20 |in toget|her all |
|00000ce0| 61 6c 6c 6f 63 61 28 29 | 65 64 20 62 6c 6f 63 6b |alloca()|ed block|
|00000cf0| 73 3b 0d 09 28 62 29 20 | 6b 65 65 70 20 74 72 61 |s;..(b) |keep tra|
|00000d00| 63 6b 20 6f 66 20 73 74 | 61 63 6b 20 64 65 70 74 |ck of st|ack dept|
|00000d10| 68 2e 0d 0d 09 49 74 20 | 69 73 20 76 65 72 79 20 |h....It |is very |
|00000d20| 69 6d 70 6f 72 74 61 6e | 74 20 74 68 61 74 20 73 |importan|t that s|
|00000d30| 69 7a 65 6f 66 28 68 65 | 61 64 65 72 29 20 61 67 |izeof(he|ader) ag|
|00000d40| 72 65 65 20 77 69 74 68 | 20 6d 61 6c 6c 6f 63 28 |ree with| malloc(|
|00000d50| 29 0d 09 61 6c 69 67 6e | 6d 65 6e 74 20 63 68 75 |)..align|ment chu|
|00000d60| 6e 6b 20 73 69 7a 65 2e | 20 20 54 68 65 20 66 6f |nk size.| The fo|
|00000d70| 6c 6c 6f 77 69 6e 67 20 | 64 65 66 61 75 6c 74 20 |llowing |default |
|00000d80| 73 68 6f 75 6c 64 20 77 | 6f 72 6b 20 6f 6b 61 79 |should w|ork okay|
|00000d90| 2e 0d 2a 2f 0d 0d 23 69 | 66 6e 64 65 66 09 41 4c |..*/..#i|fndef.AL|
|00000da0| 49 47 4e 5f 53 49 5a 45 | 0d 23 64 65 66 69 6e 65 |IGN_SIZE|.#define|
|00000db0| 09 41 4c 49 47 4e 5f 53 | 49 5a 45 09 73 69 7a 65 |.ALIGN_S|IZE.size|
|00000dc0| 6f 66 28 64 6f 75 62 6c | 65 29 0d 23 65 6e 64 69 |of(doubl|e).#endi|
|00000dd0| 66 0d 0d 74 79 70 65 64 | 65 66 20 75 6e 69 6f 6e |f..typed|ef union|
|00000de0| 20 68 64 72 0d 7b 0d 20 | 20 63 68 61 72 09 61 6c | hdr.{. | char.al|
|00000df0| 69 67 6e 5b 41 4c 49 47 | 4e 5f 53 49 5a 45 5d 3b |ign[ALIG|N_SIZE];|
|00000e00| 09 2f 2a 20 74 6f 20 66 | 6f 72 63 65 20 73 69 7a |./* to f|orce siz|
|00000e10| 65 6f 66 28 68 65 61 64 | 65 72 29 20 2a 2f 0d 20 |eof(head|er) */. |
|00000e20| 20 73 74 72 75 63 74 0d | 20 20 20 20 7b 0d 20 20 | struct.| {. |
|00000e30| 20 20 20 20 75 6e 69 6f | 6e 20 68 64 72 20 2a 6e | unio|n hdr *n|
|00000e40| 65 78 74 3b 09 09 2f 2a | 20 66 6f 72 20 63 68 61 |ext;../*| for cha|
|00000e50| 69 6e 69 6e 67 20 68 65 | 61 64 65 72 73 20 2a 2f |ining he|aders */|
|00000e60| 0d 20 20 20 20 20 20 63 | 68 61 72 20 2a 64 65 65 |. c|har *dee|
|00000e70| 70 3b 09 09 2f 2a 20 66 | 6f 72 20 73 74 61 63 6b |p;../* f|or stack|
|00000e80| 20 64 65 70 74 68 20 6d | 65 61 73 75 72 65 20 2a | depth m|easure *|
|00000e90| 2f 0d 20 20 20 20 7d 20 | 68 3b 0d 7d 20 68 65 61 |/. } |h;.} hea|
|00000ea0| 64 65 72 3b 0d 0d 2f 2a | 0d 09 61 6c 6c 6f 63 61 |der;../*|..alloca|
|00000eb0| 28 20 73 69 7a 65 20 29 | 20 72 65 74 75 72 6e 73 |( size )| returns|
|00000ec0| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 61 74 | a point|er to at|
|00000ed0| 20 6c 65 61 73 74 20 60 | 73 69 7a 65 27 20 62 79 | least `|size' by|
|00000ee0| 74 65 73 20 6f 66 0d 09 | 73 74 6f 72 61 67 65 20 |tes of..|storage |
|00000ef0| 77 68 69 63 68 20 77 69 | 6c 6c 20 62 65 20 61 75 |which wi|ll be au|
|00000f00| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 72 65 63 6c |tomatica|lly recl|
|00000f10| 61 69 6d 65 64 20 75 70 | 6f 6e 20 65 78 69 74 20 |aimed up|on exit |
|00000f20| 66 72 6f 6d 0d 09 74 68 | 65 20 70 72 6f 63 65 64 |from..th|e proced|
|00000f30| 75 72 65 20 74 68 61 74 | 20 63 61 6c 6c 65 64 20 |ure that| called |
|00000f40| 61 6c 6c 6f 63 61 28 29 | 2e 20 20 4f 72 69 67 69 |alloca()|. Origi|
|00000f50| 6e 61 6c 6c 79 2c 20 74 | 68 69 73 20 73 70 61 63 |nally, t|his spac|
|00000f60| 65 0d 09 77 61 73 20 73 | 75 70 70 6f 73 65 64 20 |e..was s|upposed |
|00000f70| 74 6f 20 62 65 20 74 61 | 6b 65 6e 20 66 72 6f 6d |to be ta|ken from|
|00000f80| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 73 74 61 | the cur|rent sta|
|00000f90| 63 6b 20 66 72 61 6d 65 | 20 6f 66 20 74 68 65 0d |ck frame| of the.|
|00000fa0| 09 63 61 6c 6c 65 72 2c | 20 62 75 74 20 74 68 61 |.caller,| but tha|
|00000fb0| 74 20 6d 65 74 68 6f 64 | 20 63 61 6e 6e 6f 74 20 |t method| cannot |
|00000fc0| 62 65 20 6d 61 64 65 20 | 74 6f 20 77 6f 72 6b 20 |be made |to work |
|00000fd0| 66 6f 72 20 73 6f 6d 65 | 0d 09 69 6d 70 6c 65 6d |for some|..implem|
|00000fe0| 65 6e 74 61 74 69 6f 6e | 73 20 6f 66 20 43 2c 20 |entation|s of C, |
|00000ff0| 66 6f 72 20 65 78 61 6d | 70 6c 65 20 75 6e 64 65 |for exam|ple unde|
|00001000| 72 20 47 6f 75 6c 64 27 | 73 20 55 54 58 2f 33 32 |r Gould'|s UTX/32|
|00001010| 2e 0d 2a 2f 0d 0d 73 74 | 61 74 69 63 20 68 65 61 |..*/..st|atic hea|
|00001020| 64 65 72 20 2a 6c 61 73 | 74 5f 61 6c 6c 6f 63 61 |der *las|t_alloca|
|00001030| 5f 68 65 61 64 65 72 20 | 3d 20 4e 55 4c 4c 3b 20 |_header |= NULL; |
|00001040| 2f 2a 20 2d 3e 20 6c 61 | 73 74 20 61 6c 6c 6f 63 |/* -> la|st alloc|
|00001050| 61 20 68 65 61 64 65 72 | 20 2a 2f 0d 0d 70 6f 69 |a header| */..poi|
|00001060| 6e 74 65 72 0d 61 6c 6c | 6f 63 61 20 28 73 69 7a |nter.all|oca (siz|
|00001070| 65 29 09 09 09 2f 2a 20 | 72 65 74 75 72 6e 73 20 |e).../* |returns |
|00001080| 70 6f 69 6e 74 65 72 20 | 74 6f 20 73 74 6f 72 61 |pointer |to stora|
|00001090| 67 65 20 2a 2f 0d 20 20 | 20 20 20 75 6e 73 69 67 |ge */. | unsig|
|000010a0| 6e 65 64 09 73 69 7a 65 | 3b 09 09 2f 2a 20 23 20 |ned.size|;../* # |
|000010b0| 62 79 74 65 73 20 74 6f | 20 61 6c 6c 6f 63 61 74 |bytes to| allocat|
|000010c0| 65 20 2a 2f 0d 7b 0d 20 | 20 61 75 74 6f 20 63 68 |e */.{. | auto ch|
|000010d0| 61 72 09 70 72 6f 62 65 | 3b 09 09 2f 2a 20 70 72 |ar.probe|;../* pr|
|000010e0| 6f 62 65 73 20 73 74 61 | 63 6b 20 64 65 70 74 68 |obes sta|ck depth|
|000010f0| 3a 20 2a 2f 0d 20 20 72 | 65 67 69 73 74 65 72 20 |: */. r|egister |
|00001100| 63 68 61 72 09 2a 64 65 | 70 74 68 20 3d 20 26 70 |char.*de|pth = &p|
|00001110| 72 6f 62 65 3b 0d 0d 23 | 69 66 20 53 54 41 43 4b |robe;..#|if STACK|
|00001120| 5f 44 49 52 45 43 54 49 | 4f 4e 20 3d 3d 20 30 0d |_DIRECTI|ON == 0.|
|00001130| 20 20 69 66 20 28 53 54 | 41 43 4b 5f 44 49 52 20 | if (ST|ACK_DIR |
|00001140| 3d 3d 20 30 29 09 09 2f | 2a 20 75 6e 6b 6e 6f 77 |== 0)../|* unknow|
|00001150| 6e 20 67 72 6f 77 74 68 | 20 64 69 72 65 63 74 69 |n growth| directi|
|00001160| 6f 6e 20 2a 2f 0d 20 20 | 20 20 66 69 6e 64 5f 73 |on */. | find_s|
|00001170| 74 61 63 6b 5f 64 69 72 | 65 63 74 69 6f 6e 20 28 |tack_dir|ection (|
|00001180| 29 3b 0d 23 65 6e 64 69 | 66 0d 0d 09 09 09 09 2f |);.#endi|f....../|
|00001190| 2a 20 52 65 63 6c 61 69 | 6d 20 67 61 72 62 61 67 |* Reclai|m garbag|
|000011a0| 65 2c 20 64 65 66 69 6e | 65 64 20 61 73 20 61 6c |e, defin|ed as al|
|000011b0| 6c 20 61 6c 6c 6f 63 61 | 28 29 65 64 20 73 74 6f |l alloca|()ed sto|
|000011c0| 72 61 67 65 20 74 68 61 | 74 0d 09 09 09 09 20 20 |rage tha|t..... |
|000011d0| 20 77 61 73 20 61 6c 6c | 6f 63 61 74 65 64 20 66 | was all|ocated f|
|000011e0| 72 6f 6d 20 64 65 65 70 | 65 72 20 69 6e 20 74 68 |rom deep|er in th|
|000011f0| 65 20 73 74 61 63 6b 20 | 74 68 61 6e 20 63 75 72 |e stack |than cur|
|00001200| 72 65 6e 74 6c 79 2e 20 | 2a 2f 0d 0d 20 20 7b 0d |rently. |*/.. {.|
|00001210| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 68 65 61 | regi|ster hea|
|00001220| 64 65 72 09 2a 68 70 3b | 09 2f 2a 20 74 72 61 76 |der.*hp;|./* trav|
|00001230| 65 72 73 65 73 20 6c 69 | 6e 6b 65 64 20 6c 69 73 |erses li|nked lis|
|00001240| 74 20 2a 2f 0d 0d 20 20 | 20 20 66 6f 72 20 28 68 |t */.. | for (h|
|00001250| 70 20 3d 20 6c 61 73 74 | 5f 61 6c 6c 6f 63 61 5f |p = last|_alloca_|
|00001260| 68 65 61 64 65 72 3b 20 | 68 70 20 21 3d 20 4e 55 |header; |hp != NU|
|00001270| 4c 4c 3b 29 0d 20 20 20 | 20 20 20 69 66 20 28 53 |LL;). | if (S|
|00001280| 54 41 43 4b 5f 44 49 52 | 20 3e 20 30 20 26 26 20 |TACK_DIR| > 0 && |
|00001290| 68 70 2d 3e 68 2e 64 65 | 65 70 20 3e 20 64 65 70 |hp->h.de|ep > dep|
|000012a0| 74 68 0d 09 20 20 7c 7c | 20 53 54 41 43 4b 5f 44 |th.. ||| STACK_D|
|000012b0| 49 52 20 3c 20 30 20 26 | 26 20 68 70 2d 3e 68 2e |IR < 0 &|& hp->h.|
|000012c0| 64 65 65 70 20 3c 20 64 | 65 70 74 68 29 0d 09 7b |deep < d|epth)..{|
|000012d0| 0d 09 20 20 72 65 67 69 | 73 74 65 72 20 68 65 61 |.. regi|ster hea|
|000012e0| 64 65 72 09 2a 6e 70 20 | 3d 20 68 70 2d 3e 68 2e |der.*np |= hp->h.|
|000012f0| 6e 65 78 74 3b 0d 0d 09 | 20 20 66 72 65 65 20 28 |next;...| free (|
|00001300| 28 70 6f 69 6e 74 65 72 | 29 20 68 70 29 3b 09 2f |(pointer|) hp);./|
|00001310| 2a 20 63 6f 6c 6c 65 63 | 74 20 67 61 72 62 61 67 |* collec|t garbag|
|00001320| 65 20 2a 2f 0d 0d 09 20 | 20 68 70 20 3d 20 6e 70 |e */... | hp = np|
|00001330| 3b 09 09 2f 2a 20 2d 3e | 20 6e 65 78 74 20 68 65 |;../* ->| next he|
|00001340| 61 64 65 72 20 2a 2f 0d | 09 7d 0d 20 20 20 20 20 |ader */.|.}. |
|00001350| 20 65 6c 73 65 0d 09 62 | 72 65 61 6b 3b 09 09 09 | else..b|reak;...|
|00001360| 2f 2a 20 72 65 73 74 20 | 61 72 65 20 6e 6f 74 20 |/* rest |are not |
|00001370| 64 65 65 70 65 72 20 2a | 2f 0d 0d 20 20 20 20 6c |deeper *|/.. l|
|00001380| 61 73 74 5f 61 6c 6c 6f | 63 61 5f 68 65 61 64 65 |ast_allo|ca_heade|
|00001390| 72 20 3d 20 68 70 3b 09 | 2f 2a 20 2d 3e 20 6c 61 |r = hp;.|/* -> la|
|000013a0| 73 74 20 76 61 6c 69 64 | 20 73 74 6f 72 61 67 65 |st valid| storage|
|000013b0| 20 2a 2f 0d 20 20 7d 0d | 0d 20 20 69 66 20 28 73 | */. }.|. if (s|
|000013c0| 69 7a 65 20 3d 3d 20 30 | 29 0d 20 20 20 20 72 65 |ize == 0|). re|
|000013d0| 74 75 72 6e 20 4e 55 4c | 4c 3b 09 09 2f 2a 20 6e |turn NUL|L;../* n|
|000013e0| 6f 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 20 72 65 71 |o alloca|tion req|
|000013f0| 75 69 72 65 64 20 2a 2f | 0d 0d 20 20 2f 2a 20 41 |uired */|.. /* A|
|00001400| 6c 6c 6f 63 61 74 65 20 | 63 6f 6d 62 69 6e 65 64 |llocate |combined|
|00001410| 20 68 65 61 64 65 72 20 | 2b 20 75 73 65 72 20 64 | header |+ user d|
|00001420| 61 74 61 20 73 74 6f 72 | 61 67 65 2e 20 2a 2f 0d |ata stor|age. */.|
|00001430| 0d 20 20 7b 0d 20 20 20 | 20 72 65 67 69 73 74 65 |. {. | registe|
|00001440| 72 20 70 6f 69 6e 74 65 | 72 09 6e 65 77 20 3d 20 |r pointe|r.new = |
|00001450| 78 6d 61 6c 6c 6f 63 20 | 28 73 69 7a 65 6f 66 20 |xmalloc |(sizeof |
|00001460| 28 68 65 61 64 65 72 29 | 20 2b 20 73 69 7a 65 29 |(header)| + size)|
|00001470| 3b 0d 20 20 20 20 2f 2a | 20 61 64 64 72 65 73 73 |;. /*| address|
|00001480| 20 6f 66 20 68 65 61 64 | 65 72 20 2a 2f 0d 0d 20 | of head|er */.. |
|00001490| 20 20 20 28 28 68 65 61 | 64 65 72 20 2a 29 6e 65 | ((hea|der *)ne|
|000014a0| 77 29 2d 3e 68 2e 6e 65 | 78 74 20 3d 20 6c 61 73 |w)->h.ne|xt = las|
|000014b0| 74 5f 61 6c 6c 6f 63 61 | 5f 68 65 61 64 65 72 3b |t_alloca|_header;|
|000014c0| 0d 20 20 20 20 28 28 68 | 65 61 64 65 72 20 2a 29 |. ((h|eader *)|
|000014d0| 6e 65 77 29 2d 3e 68 2e | 64 65 65 70 20 3d 20 64 |new)->h.|deep = d|
|000014e0| 65 70 74 68 3b 0d 0d 20 | 20 20 20 6c 61 73 74 5f |epth;.. | last_|
|000014f0| 61 6c 6c 6f 63 61 5f 68 | 65 61 64 65 72 20 3d 20 |alloca_h|eader = |
|00001500| 28 68 65 61 64 65 72 20 | 2a 29 6e 65 77 3b 0d 0d |(header |*)new;..|
|00001510| 20 20 20 20 2f 2a 20 55 | 73 65 72 20 73 74 6f 72 | /* U|ser stor|
|00001520| 61 67 65 20 62 65 67 69 | 6e 73 20 6a 75 73 74 20 |age begi|ns just |
|00001530| 61 66 74 65 72 20 68 65 | 61 64 65 72 2e 20 2a 2f |after he|ader. */|
|00001540| 0d 0d 20 20 20 20 72 65 | 74 75 72 6e 20 28 70 6f |.. re|turn (po|
|00001550| 69 6e 74 65 72 29 28 28 | 63 68 61 72 20 2a 29 6e |inter)((|char *)n|
|00001560| 65 77 20 2b 20 73 69 7a | 65 6f 66 28 68 65 61 64 |ew + siz|eof(head|
|00001570| 65 72 29 29 3b 0d 20 20 | 7d 0d 7d 0d 0d 70 6f 69 |er));. |}.}..poi|
|00001580| 6e 74 65 72 20 78 6d 61 | 6c 6c 6f 63 28 6e 29 0d |nter xma|lloc(n).|
|00001590| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 6e 3b 0d |unsigned| int n;.|
|000015a0| 7b 0d 20 20 65 78 74 65 | 72 6e 20 70 6f 69 6e 74 |{. exte|rn point|
|000015b0| 65 72 20 6d 61 6c 6c 6f | 63 28 29 3b 0d 20 20 70 |er mallo|c();. p|
|000015c0| 6f 69 6e 74 65 72 20 63 | 70 3b 0d 20 20 73 74 61 |ointer c|p;. sta|
|000015d0| 74 69 63 20 63 68 61 72 | 20 6d 65 73 67 5b 5d 20 |tic char| mesg[] |
|000015e0| 3d 20 22 78 6d 61 6c 6c | 6f 63 3a 20 6e 6f 20 6d |= "xmall|oc: no m|
|000015f0| 65 6d 6f 72 79 21 5c 6e | 22 3b 0d 0d 20 20 63 70 |emory!\n|";.. cp|
|00001600| 20 3d 20 6d 61 6c 6c 6f | 63 28 6e 29 3b 0d 20 20 | = mallo|c(n);. |
|00001610| 69 66 20 28 21 20 63 70 | 29 20 7b 0d 20 20 20 20 |if (! cp|) {. |
|00001620| 77 72 69 74 65 20 28 32 | 2c 20 6d 65 73 67 2c 20 |write (2|, mesg, |
|00001630| 73 69 7a 65 6f 66 28 6d | 65 73 67 29 20 2d 20 31 |sizeof(m|esg) - 1|
|00001640| 29 3b 0d 20 20 20 20 65 | 78 69 74 28 31 29 3b 0d |);. e|xit(1);.|
|00001650| 20 20 7d 0d 20 20 72 65 | 74 75 72 6e 20 63 70 3b | }. re|turn cp;|
|00001660| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00001670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001680| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001690| 20 62 65 67 69 6e 73 20 | 6a 75 73 74 20 61 66 74 | begins |just aft|
|000016a0| 65 72 20 68 65 61 64 65 | 72 2e 20 2a 2f 0d 0d 20 |er heade|r. */.. |
|000016b0| 08 61 6c 6c 6f 63 61 2e | 63 00 02 00 00 00 54 45 |.alloca.|c.....TE|
|000016c0| 58 54 4d 50 53 20 00 00 | 00 00 00 00 00 00 00 00 |XTMPS ..|........|
|000016d0| 00 00 54 45 58 54 4d 50 | 53 20 00 00 00 00 00 00 |..TEXTMP|S ......|
|000016e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016f0| 00 00 a4 10 fb 48 00 00 | 15 e3 00 00 01 ac 6e 73 |.....H..|......ns|
|00001700| 69 67 6e 65 64 20 69 6e | 74 20 6e 3b 0d 7b 0d 20 |igned in|t n;.{. |
|00001710| 20 65 78 74 65 72 6e 20 | 70 6f 69 6e 74 65 72 20 | extern |pointer |
|00001720| 6d 61 6c 6c 6f 63 28 29 | 3b 0d 20 20 70 6f 69 6e |malloc()|;. poin|
|00001730| 74 65 72 20 63 70 3b 0d | 20 20 73 74 61 74 69 63 |ter cp;.| static|
|00001740| 20 63 68 61 72 20 6d 65 | 73 67 5b 5d 20 3d 20 22 | char me|sg[] = "|
|00001750| 78 6d 61 6c 6c 6f 63 3a | 20 6e 6f 20 6d 65 6d 6f |xmalloc:| no memo|
|00001760| 72 79 21 5c 6e 22 3b 0d | 0d 20 20 63 70 20 3d 20 |ry!\n";.|. cp = |
|00001770| 6d 61 6c 6c 6f 63 28 6e | 29 3b 0d 20 20 69 66 20 |malloc(n|);. if |
|00001780| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 73 74 20 |...H..Mo|naco.st |
|00001790| 65 64 69 74 3a 09 38 36 | 2f 30 35 2f 33 30 09 72 |edit:.86|/05/30.r|
|000017a0| 6d 73 0d 09 20 20 00 06 | 00 03 00 3c 00 24 01 dd |ms.. ..|...<.$..|
|000017b0| 02 3d 00 3c 00 24 01 dd | 02 3d a6 04 c2 06 00 00 |.=.<.$..|.=......|
|000017c0| 04 ed 00 00 04 f6 00 00 | 03 ef 01 00 00 00 00 1e |........|........|
|000017d0| 00 3c 00 24 01 dd 02 3d | 00 3c 00 24 01 dd 02 3d |.<.$...=|.<.$...=|
|000017e0| 00 00 03 ef 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 49 |.....n..|.n...>.I|
|00001800| aa 38 13 1a 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.8......|.>..MPSR|
|00001810| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00001820| 03 f0 ff ff 00 00 00 4c | 00 4f dd d8 00 00 00 00 |.......L|.O......|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+